
				当前位置：
				<a href="<?php echo site_url('admin/ads/index'); ?>" class="layui-btn layui-btn-sm fr">广告列表</a>
				<span class="layui-breadcrumb" lay-separator="/">
					<a href="<?php echo site_url('admin/ads/index'); ?>">广告管理</a>
					<a><cite>添加广告</cite></a>
				</span>

				<fieldset class="layui-elem-field layui-field-title">
					<legend>添加广告</legend>
				</fieldset>

				<form class="layui-form layui-form-pane" action="" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label">所属分类</label>
						<div class="layui-input-inline">
							<select name="adscate_id" lay-filter="adscate_id">
								<option value="">--请选择--</option>
								<?php
								if (! empty($lists)):
									$adscate_id = $this->uri->segment(4, 0);
									foreach ($lists as $key => $value):
								?>
								<option value="<?php echo $value['id']; ?>"<?php echo $adscate_id == $value['id'] ? ' selected' : ''; ?>><?php echo $value['name']; ?></option>
								<?php
									endforeach;
								endif;
								?>
							</select>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">广告名称</label>
						<div class="layui-input-inline">
							<input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入广告名称" class="layui-input">
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">广告图片</label>
						<div class="layui-input-inline">
							<input type="text" name="image" lay-type="image" lay-verify="required" class="layui-input">
						</div>
						<div class="layui-input-inline input-file">
							<button type="button" class="layui-btn upload-image" data-url="<?php echo current_url(); ?>?type=image" data-type="image" data-exts="jpg|png|gif|bmp|jpeg" data-name="image"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
						</div>
						<div class="layui-form-mid layui-word-aux">广告图片必须上传</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">广告链接</label>
						<div class="layui-input-inline">
							<input type="text" name="url" lay-verify="" autocomplete="off" placeholder="请输入广告链接" class="layui-input">
						</div>
						<div class="layui-form-mid layui-word-aux">如有链接请填写</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">排序</label>
						<div class="layui-input-inline">
							<input type="number" name="sort" lay-verify="number" autocomplete="off" class="layui-input" value="100">
						</div>
						<div class="layui-form-mid layui-word-aux">值越小越靠前</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">状态</label>
						<div class="layui-input-block">
							<input type="checkbox" name="status" lay-skin="switch" lay-text="On|Off" title="开关" value="1" checked>
						</div>
					</div>

					<div class="layui-form-item">
						<div class="layui-input-block">
						<button class="layui-btn" lay-submit="" lay-filter="form-ads">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
